package com.hundsun.yr.universal.p2p.ui.adapter;

import java.util.List;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.hundsun.yr.universal.p2p.ui.activity.base.BaseFragment;

/**
 * @Title: ProjectPagerAdapter.java 
 * @Description: 项目viewpager适配器
 * @date 2015-12-8 上午10:58:01 
 * @author:hejun.shen
 * @email:shenhj15971@hundsun.com 
 * @replace author:
 * @replace date:
 * @version V1.0   
 */
public class ProjectPagerAdapter extends FragmentPagerAdapter {
	private List<BaseFragment> mFragments;
	private String [] mTitle;

	public ProjectPagerAdapter(FragmentManager fm, List<BaseFragment> fragments,String[] title) {
		super(fm);
		this.mFragments = fragments;
		this.mTitle=title;
	}

	@Override
	public Fragment getItem(int position) {

		return mFragments.get(position);
	}

	@Override
	public int getCount() {
		return mFragments.size();
	}
	
	@Override
	public CharSequence getPageTitle(int position) {
		// TODO Auto-generated method stub
		
		return mTitle[position];
	}

}
